<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>21行内块运用制作页码效果</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        .box {
            line-height: 36px;
            text-align: center;
            margin: 50px 0;
        }
        
        .box a {
            display: inline-block;
            width: 36px;
            height: 36px;
            background: #f7f7f7;
            border: 1px solid #ccc;
            text-decoration: none;
            color: #333;
            font-size: 14px;
        }
        
        .box .active,
        .box .eli {
            border: none;
            background: #fff;
            cursor: not-allowed;
            /* 元素不对指针事件做出反应。 */
            pointer-events: none;
        }
        
        .box .prev,
        .box .next {
            width: 85px;
            border-radius: 5px;
        }
        
        .box input {
            height: 32px;
            width: 68px;
            outline: none;
            border-radius: 5px;
            background: #f7f7f7;
            margin: 0 5px;
            text-align: center;
            border: 1px solid #ccc;
        }
        
        .box button {
            height: 36px;
            width: 70px;
            cursor: pointer;
            border-radius: 5px;
            border: 1px solid #ccc;
        }
        
        .box a:hover {
            background: orange;
            color: #fff;
        }
        
        .box .active:hover,
        .box .eli:hover {
            background: #fff;
            color: #333;
        }
    </style>
</head>

<body>
    <div class="box">
        <a href="#" class="prev">&lt;&lt;上一页</a>
        <a href="#">1</a>
        <a href="javascript:;" class="active">2</a>
        <a href="#">3</a>
        <a href="#">4</a>
        <a href="#">5</a>
        <a href="#">6</a>
        <a href="javascript:;" class="eli">...</a>
        <a href="#" class="next">&gt;&gt;下一页</a> 共10页 到第
        <input type="text" maxlength="4">页
        <button>确定</button>
    </div>
</body>

</html>